package com.netease.framework.a;

import com.netease.a.a.g;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.StatusLine;

public class j
{
  public static final int a = 0;
  public static final int b = 1;
  public static final int c = 2;
  g d;
  String e;
  HttpResponse f;
  boolean g;

  public int a()
  {
    int i = 0;
    if (this.e != null);
    while (true)
    {
      return i;
      if ((this.d == null) || (this.d.h() == null) || (this.g))
      {
        i = 2;
        continue;
      }
      if (this.d.f() >= System.currentTimeMillis())
        continue;
      i = 1;
    }
  }

  public void a(g paramg)
  {
    this.d = paramg;
  }

  public void a(String paramString)
  {
    this.e = paramString;
  }

  public void a(HttpResponse paramHttpResponse)
  {
    this.f = paramHttpResponse;
  }

  public void a(boolean paramBoolean)
  {
    this.g = paramBoolean;
  }

  public g b()
  {
    return this.d;
  }

  public String c()
  {
    return this.e;
  }

  public HttpResponse d()
  {
    return this.f;
  }

  public int e()
  {
    int i = 200;
    if (this.f != null);
    for (i = this.f.getStatusLine().getStatusCode(); ; i = -1)
      do
        return i;
      while ((this.e != null) || (this.d != null));
  }

  public long f()
  {
    long l;
    if ((this.f != null) && (this.f.getFirstHeader("Content-Length") != null))
      l = this.f.getEntity().getContentLength();
    while (true)
    {
      return l;
      l = -1L;
    }
  }

  public InputStream g()
  {
    if (this.e != null);
    while (true)
    {
      Object localObject;
      try
      {
        localObject = new FileInputStream(this.e);
        return localObject;
      }
      catch (IOException localIOException3)
      {
        localIOException3.printStackTrace();
      }
      if (this.f != null);
      try
      {
        InputStream localInputStream2 = this.f.getEntity().getContent();
        localObject = localInputStream2;
      }
      catch (IllegalStateException localIllegalStateException)
      {
        localIllegalStateException.printStackTrace();
        if (this.d == null);
      }
      catch (IOException localIOException2)
      {
        try
        {
          InputStream localInputStream1 = this.d.k();
          localObject = localInputStream1;
          continue;
          localIOException2 = localIOException2;
          localIOException2.printStackTrace();
        }
        catch (IOException localIOException1)
        {
          localIOException1.printStackTrace();
        }
        localObject = null;
      }
    }
  }

  public String h()
  {
    if (this.d != null);
    for (String str = this.d.h(); ; str = null)
      return str;
  }

  public String i()
  {
    String str;
    if (this.f != null)
    {
      Header localHeader = this.f.getFirstHeader("Content-Encoding");
      if (localHeader == null)
        break label50;
      str = localHeader.getValue();
    }
    while (true)
    {
      return str;
      if (this.d != null)
      {
        str = this.d.j();
        continue;
      }
      label50: str = null;
    }
  }

  public String j()
  {
    Header localHeader;
    if (this.f != null)
    {
      localHeader = this.f.getFirstHeader("Content-Type");
      if (localHeader == null);
    }
    for (String str = localHeader.getValue(); ; str = null)
      return str;
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.framework.a.j
 * JD-Core Version:    0.6.0
 */